/******************************************************************************
** 
** Fahrenheit to celcius
** 
** File name:	fahr_to_celc.c
** Compilation:	cc fahr_to_celc.c -o fahr_to_celc
** Execution:	./fahr_to_celc
** 
** Description:
** Prints a table of Fahrenheit degrees values and the corresponding Celcius
** degrees values.
** 
******************************************************************************/
#include <stdio.h>

main()
{
   int fahr, celcius;
   int lower, upper, step;

   lower = 0;       // lower temperature in the table
   upper = 300;     // upper temperature in the table
   step = 20;

   fahr = lower;
   while(fahr <= upper) {
       celcius = 5 * (fahr-32) / 9;
       printf("%d\t%d\n", fahr, celcius);
       fahr = fahr + step;
   }
}

